


Monika's Python course!

by RavenclawOIer



Category: Doki Doki Literature Club! (Visual Novel)
Language: English
Status: In-Progress
Published: 2020-05-16
Updated: 2020-05-20
Packaged: 2021-03-03 00:41:38
Rating: General Audiences
Warnings: No Archive Warnings Apply
Chapters: 2
Words: 553
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/24216088
Author URL: https://archiveofourown.org/users/RavenclawOIer/pseuds/RavenclawOIer
Summary: Learn Python with your cutest girlfriend - Monika!
Comments: 5
Kudos: 4





	1. Lesson 1: Getting familiar with Python

Hi! Monika here!

So you said you want to learn Python? That's great!

I have been learning it myself, the game does comes with a python runtime and I studied documentations online, I have also practiced coding a lot!Now that you are my only sweetheart, I will never hesitate to teach you! Ehehe~

Okay, so now ... Where do I begin? Let's see...

I suppose you do not have a Python environment installed, right? Here, I will teach you how to install it.

If you are using Linux, you likely already have a Python built in. However, if you are not using the latest versions, it might be a out-of-date Python 2, I don't want you, my sweetheart, to learn something that's practically useless a few years later! So you might need to install a newer Python 3 version with your package manager. When you are done, type
    
    
    python

in your terminal and you should see a Python interactive shell!

If you are using Windows, it would be trickier. You need to go to the official website : [python.org ](https://www.python.org) to download an installer, then, perform the magic of "next, next, next, finish". Oh, be sure to have "Add Python to PATH" checked and when you type
    
    
    python

in terminal you should see an interactive environment~

Okay, so now you've got it up and running. Let's _really_ get started and do some coding! And yes, I know, the most famous starter is "Hello, world!", but it is me, _Monika_ , who am teaching you. And as we all know you will always love me as I always will love you. So let's start with a "I love you, Monika"~

Type
    
    
    python

in your terminal and you will see something like this:
    
    
    Python 3.8.2 (default, Apr 27 2020, 15:53:34) 
    [GCC 9.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

See that ">>>"? Just type your code after it. In this case, we will write:
    
    
    print("I love you, Monika!")

This is what you'll probably see:
    
    
    print("I love you, Monika!")
    I love you, Monika!
    

And there you go! You just expressed your love to me through Python! Don't forget, I will always love you too~ Stay focused~


	2. Lesson 2: Basic Coding Techniques

**Summary for the Chapter:**

> In this lesson, you will learn
> 
> * Processing input and output  
> * Simplest sequential programs  
> * Using if conditionals  
> * The IPO (Input - Process - Output) way of thinking

_This chapter is a work in progress_

##  Processing input and output 

Monika here! So it's the second lesson of our Python experience. If you have listened to me carefully, you should now know how to code in the Python interactive Environment (remember the ">>>"?). However, it would be painful to write large pieces of code there. So here are two ways for you to write large pieces of code.

 **If you are using Windows** , search for "IDLE" in your search box, you will see _another_ Python interactive environment. Then, select "File>New", and you should see a blank box. You can code there. When you are done, simply click the "run" menu in the menubar, and you will be brought back to the interactive environment. You can play with your programs there!

 **If you are using *nix** , grab an editor of your choice (Vim/Nano/Emacs/Kate/Gedit), write your code there, save it into a file, then, go to your terminal and issue the following command
    
    
    python [your file]

. You can then play with your program!

Have you thought of S


End file.
